/*
 * Copyright (C) 2023 xuexiangjys(xuexiangjys@163.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package com.xuexiang.templateproject.bean;

//import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public final class Option {
    private final boolean checked;
    @NotNull
    private final String name;

    public Option(@NotNull String name, boolean z) {
        Intrinsics.checkNotNullParameter(name, "name");
        this.name = name;
        this.checked = z;
    }

    public static /* synthetic */ Option copy$default(Option option, String str, boolean z, int i2, Object obj) {
        if ((i2 & 1) != 0) {
            str = option.name;
        }
        if ((i2 & 2) != 0) {
            z = option.checked;
        }
        return option.copy(str, z);
    }

    @NotNull
    public final String component1() {
        return this.name;
    }

    public final boolean component2() {
        return this.checked;
    }

    @NotNull
    public final Option copy(@NotNull String name, boolean z) {
        Intrinsics.checkNotNullParameter(name, "name");
        return new Option(name, z);
    }

    public boolean equals(@Nullable Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof Option)) {
            return false;
        }
        Option option = (Option) obj;
        return Intrinsics.areEqual(this.name, option.name) && this.checked == option.checked;
    }

    public final boolean getChecked() {
        return this.checked;
    }

    @NotNull
    public final String getName() {
        return this.name;
    }

    public int hashCode() {
        int hashCode = this.name.hashCode() * 31;
        boolean z = this.checked;
        if (z) {
            z = true;
        }
        int i2 = z ? 1 : 0;
        int i3 = z ? 1 : 0;
        int i4 = z ? 1 : 0;
        return hashCode + i2;
    }

    @NotNull
    public String toString() {
        return "Option(name=" + this.name + ", checked=" + this.checked + ')';
    }
}